﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainTemplate.Master" AutoEventWireup="true" CodeBehind="UsageInformation.aspx.cs" Inherits="SmartCounters.UsageInformation" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ScriptsAndStylesPlaceHolder" runat="server">
    <link rel="stylesheet" type="text/css" href="/css/UsageInformation.css" />
	<script type="text/javascript" src="/Scripts/UsageInformation.js"></script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="TitleContentPlaceHolder" runat="server">
    Usage Information
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<asp:UpdatePanel ID="UsagetUpdatePanel" runat="server">
<ContentTemplate>
    <fieldset class="UsageFieldset shadow">
	    <legend>Account Usage Information</legend>

        <div><asp:Label ID="lblFromDat" runat="server">Start Date: </asp:Label></div>
		<div><asp:TextBox class="TextBox" ID="tbStartDate" runat="server"></asp:TextBox></div>

		<div><asp:Label ID="lblEndDate" runat="server">End Date: </asp:Label></div>
		<div><asp:TextBox class="TextBox" ID="tbEndDate" runat="server"></asp:TextBox></div>

		<div><asp:Label ID="lblAccounts" runat="server">Select Account: </asp:Label></div>
		<div><asp:DropDownList class="DropDown" ID="ddAcounts" runat="server"></asp:DropDownList></div>
		<div>
			<asp:Button class="Button" ID="btShowAllUsages" Text="Show Usages Table" runat="server" onclick="btShowAllUsages_Click"/>
			<asp:Button class="Button" ID="btShowChart" Text="Show Usages Chart" runat="server" onclick="btShowChart_Click" />
		</div>

        <asp:GridView ID="usagesGrid" runat="server">
        </asp:GridView>

        <asp:Chart ID="chart" runat="server" CssClass="Chart" Height="400px" Width="1000px">
            <Series>
                <asp:Series ChartArea="ChartArea1" Name="Series1">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                    <AxisY Title="Total Usage (Litres)">
                    </AxisY>
                    <AxisX Title="Date">
                    </AxisX>
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
	</fieldset>
</ContentTemplate>
<Triggers>
	<asp:AsyncPostBackTrigger ControlID="btShowAllUsages" EventName="Click" />
	<asp:AsyncPostBackTrigger ControlID="btShowChart" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UsagetUpdatePanel" runat="server">
<ProgressTemplate>
<div class="modalBackground">
	<div class="modalImageContainer"><img alt="Page Loading" class="PageLoading" src="/images/PageLoading.gif" /></div>
	<div class="modalTextContainer">Please Wait...</div>
</div>
</ProgressTemplate> 
</asp:UpdateProgress>
</asp:Content>